package com.neusoft.lohas.modules.ivm.entity.order;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.neusoft.lohas.common.persistence.IdEntity;
import com.neusoft.lohas.modules.ivm.entity.merchant.Merchant;

/**
 * 温馨提示Entity
 * 
 * @author Jackie.Liu
 * @version 2015-03-02
 */
@Entity
@Table(name = "ivm_prompt")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class Prompt extends IdEntity<Prompt> {

	private static final long serialVersionUID = 1L;
	private Merchant merchant; // 所属商户
	private String prompt;

	public Prompt() {
		super();
	}

	public Prompt(String id) {
		this();
		this.id = id;
	}

	@ManyToOne
	@JoinColumn(name = "merchant_id")
	@NotFound(action = NotFoundAction.IGNORE)
	@NotNull(message = "归属商户不能为空")
	public Merchant getMerchant() {
		return merchant;
	}

	public void setMerchant(Merchant merchant) {
		this.merchant = merchant;
	}

	public String getPrompt() {
		return prompt;
	}

	public void setPrompt(String prompt) {
		this.prompt = prompt;
	}

}
